package com.gxcc3.ygps.common.core.domain.entity;

import com.gxcc3.ygps.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

public class SysIotCar extends BaseEntity {


    /**
     * 主键
     */
    private Long id;

    /**
     * 企业id
     */
    private String companyId;

    /**
     * 冷库名
     */
    private String carNumber;

    /**
     * 冷库类型
     */
    private String carType;

    /**
     * 冷库负责人
     */
    private String contractPeople;

    /**
     * 冷库负责人联系方式
     */
    private String contractPhone;

    /**
     * knd设备号
     */
    private String deviceNumber;

    /**
     * 当前温度
     */
    private String temp;

    /**
     * 当前湿度
     */
    private String hum;

    /**
     * 温湿度最后更新时间
     */
    private Date dateTime;

    /**
     * 上报时模拟的唯一温湿度设备号
     */
    private String reportTempDeviceNo;

    /**
     * 上报时模拟的唯一Gps设备号
     */
    private String reportGpsDeviceNo;

    /**
     * 上报状态
     */
    private String reportStatus;

    /**
     * 删除标志
     */
    private String delFlag;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCarNumber() {
        return carNumber;
    }

    @NotBlank(message = "车牌号不能为空")
    @Pattern(regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$",message = "车牌号不合规")
    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @NotBlank(message = "车辆类型不能为空")
    public String getCarType() {
        return carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public String getContractPeople() {
        return contractPeople;
    }

    public void setContractPeople(String contractPeople) {
        this.contractPeople = contractPeople;
    }

    public String getContractPhone() {
        return contractPhone;
    }

    public void setContractPhone(String contractPhone) {
        this.contractPhone = contractPhone;
    }

    public String getDeviceNumber() {
        return deviceNumber;
    }

    public void setDeviceNumber(String deviceNumber) {
        this.deviceNumber = deviceNumber;
    }

    public String getTemp() {
        return temp;
    }

    public void setTemp(String temp) {
        this.temp = temp;
    }

    public String getHum() {
        return hum;
    }

    public void setHum(String hum) {
        this.hum = hum;
    }

    public Date getDateTime() {
        return dateTime;
    }

    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    public String getReportTempDeviceNo() {
        return reportTempDeviceNo;
    }

    public void setReportTempDeviceNo(String reportTempDeviceNo) {
        this.reportTempDeviceNo = reportTempDeviceNo;
    }

    public String getReportGpsDeviceNo() {
        return reportGpsDeviceNo;
    }

    public void setReportGpsDeviceNo(String reportGpsDeviceNo) {
        this.reportGpsDeviceNo = reportGpsDeviceNo;
    }

    public String getReportStatus() {
        return reportStatus;
    }

    public void setReportStatus(String reportStatus) {
        this.reportStatus = reportStatus;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }


    @Override
    public String toString() {
        return "SysIotCar{" +
                "id=" + id +
                ", companyId='" + companyId + '\'' +
                ", carNumber='" + carNumber + '\'' +
                ", carType='" + carType + '\'' +
                ", contractPeople='" + contractPeople + '\'' +
                ", contractPhone='" + contractPhone + '\'' +
                ", deviceNumber='" + deviceNumber + '\'' +
                ", temp='" + temp + '\'' +
                ", hum='" + hum + '\'' +
                ", dateTime=" + dateTime +
                ", reportTempDeviceNo='" + reportTempDeviceNo + '\'' +
                ", reportGpsDeviceNo='" + reportGpsDeviceNo + '\'' +
                ", reportStatus='" + reportStatus + '\'' +
                ", delFlag='" + delFlag + '\'' +
                '}';
    }
}
